package com.bitnei.battery.examples;


import com.bitnei.battery.bean.dataBean.sale.VehSaleInfo;
import com.bitnei.battery.constants.VehTypeName;

import java.util.ArrayList;
import java.util.List;

/**
 * author : czl
 * email : czl_nylg@163.com
 * createTime : 2018-03-05
 * Description: 示例
 */
public class SaleExample {

    public static void main(String[] args){
        //请求地址
        String url = "http://127.0.0.1:8999/bitnei/v1.0/battery/receiveSaleVehicle";
        //组装数据
        List<VehSaleInfo> vehList = mockVeh();
        //调用接口
        ApiUtilExample.callApi(url,vehList);
    }


    /**
     * 模拟车辆数据
     * @return
     */
    private static List<VehSaleInfo> mockVeh(){
        List<VehSaleInfo> vehList = new ArrayList<>();
        VehSaleInfo veh = new VehSaleInfo();
        veh.setVin("J345S4PBK24EYR45X");
        veh.setLicensePlate("桂5SZ61LI");
        veh.setVehTypeName(VehTypeName.CZ.getCode());
        veh.setSaleTime("2018-10-20");
        veh.setSaleArea("北京市");

        //所属个人信息与所属企业信息，仅能填写一份

        //所属个人信息
        veh.setOwnerName("");
        veh.setIdnum("");
        //所属企业信息
        veh.setEpname("XXX企业");
        veh.setEpcode("123456789");
        veh.setEpaddress("XXX地址");

        vehList.add(veh);
        return vehList;
    }




}
